/*
package zjt.file1;

import java.io.File;
import java.io.IOException;

public class demo1 {
    public static void main(String[] args) {

    }
}
public void test1() throws IOException {
    File file = new File("c:\\a.txt");
    //1.创建文件
    boolean tag = file.createNewFile();
    System.out.println(tag);
    //2.创建目录
    File file2 = new File("c:\\aa");
    boolean mkdir = file2.mkdir();
    System.out.println(mkdir);
    //3.创建多级目录
    File file3 = new File("c:\\a\\b\\c");
    //file3.mkdir(); 创建一个目录
    file3.mkdirs();
}
//1.删除文件或者目录
    public void test2() throws IOException {
        File file = new File("c:\\a.txt");

        System.out.println(file.delete());
        File file2 = new File("c:\\aa");

        file2.delete();

        File file3 = new File("c:\\aaa\\bbb\\ccc");
        file3.mkdirs();
        file3.delete();
        file3.delete();
        file3.delete();
        System.out.println(file3);

        file3.getParentFile().delete();
        file3.getParentFile().getParentFile().delete();
    }
}
public void test3() throws IOException {
   File file  = new File("c:\\aa\\bb\\cc");
		file.mkdirs();
		//1.修改文件目录
		file.renameTo(new File("c:\\aa\\bb\\ccc"));
		File file2 = new File("c:\\a.txt");
		file2.createNewFile();
		//2.修改文件
		file2.renameTo(new File("c:\\b.txt"));
		//3.剪切操作
	File file3 = new File("c:\\b.txt");
        file3.renameTo(new File("c:\\aa\\b.txt"));
        }*/
